package com.cvs.service.impl;

import com.cvs.bean.User;
import com.cvs.dao.UserMapper;
import com.cvs.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> findall() {
        return userMapper.findAll();
    }

    @Override
    public User findOne(int id) {
        return userMapper.findOne(id);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public User findUserInfo(int id) {
        return userMapper.findUserInfo(id);
    }
}
